package com.itnoob.service.proxy;

import com.itnoob.service.Pay;

import java.math.BigDecimal;

/**
 * 委派模式代理类
 * @author zhoujun
 * @date 2025/3/18 22:50
 */
public class PayProxy {
    private Pay pay;

    public PayProxy(Pay pay) {
        this.pay = pay;
    }


    public void pay(BigDecimal amount){
        //1:判断权限
        //2:执行逻辑
        pay.pay(amount);
        //4:写入日志
    }
}
